﻿using Caliburn.Micro;
using Microsoft.Win32;

namespace PocketBook.Tasks
{
    public static class Show
    {
        public static OpenDialog<TDialog> Dialog<TDialog>() where TDialog : class, IDialog
        {
            var dialog = IoC.Get<TDialog>();
            IoC.BuildUp(dialog);

            return Dialog(dialog);
        }

        public static OpenDialog<TDialog> Dialog<TDialog>(TDialog dialog) where TDialog : class, IDialog
        {
            return new OpenDialog<TDialog>(dialog);
        }

        public static ISelectFileTask OpenFileDialog()
        {
            return new SelectFileWith<OpenFileDialog>();
        }

        public static ISelectFileTask SaveFileDialog()
        {
            return new SelectFileWith<SaveFileDialog>();
        }
    }
}
